Skip to content

Only concat concatable scripts and styles #83

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 31, 2025

Conversation

freibergergarcia
Copy link
Contributor

Expected Behavior

Only scripts and assets that are concatable should be allowed to be overridden by the css_do_concat and js_do_concat filters.

Actual Behavior

Both filters don't take into consideration whether a script/asset is concatable. One example is:
https://github.com/Automattic/nginx-http-concat/blob/master/jsconcat.php#L100-L103

Where you could attempt to concat an external script.

Steps to Reproduce

The simplest way to reproduce is adding:

add_filter( 'js_do_concat', '__return_true' );
// or
add_filter( 'css_do_concat', '__return_true' );

Before overriding $do_concat, verify if scripts and styles are actually concatable.
@rinatkhaziev rinatkhaziev merged commit 8af207b into master Mar 31, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants